package com.zgz.underwrite.model;

import java.io.Serializable;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * 投保人
 * @author zgz
 *
 */
@Entity
@Table(name="applicant")
public class Applicant implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 5531473350226401625L;

	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	private Long SApplicantId;//投保人编号
	private String SName;//投保人名称
	private String SSex;//性别
	private String SCtcType;//证件类型
	private String SCtcNum;//证件号码
	private String SMobile;//联系电话
	private String SAddress;//通讯地址
	private String SZipCode;//邮编
	private String SEmail;//邮箱
	private String SType; //客户类型
	
	@OneToMany(mappedBy="applicant",cascade=CascadeType.ALL)
	private Set<InsuranceApplication> insuranceApps;
	
	public Long getSApplicantId() {
		return SApplicantId;
	}
	public void setSApplicantId(Long sApplicantId) {
		SApplicantId = sApplicantId;
	}
	public String getSName() {
		return SName;
	}
	public void setSName(String sName) {
		SName = sName;
	}
	public String getSSex() {
		return SSex;
	}
	public void setSSex(String sSex) {
		SSex = sSex;
	}
	public String getSCtcType() {
		return SCtcType;
	}
	public void setSCtcType(String sCtcType) {
		SCtcType = sCtcType;
	}
	public String getSCtcNum() {
		return SCtcNum;
	}
	public void setSCtcNum(String sCtcNum) {
		SCtcNum = sCtcNum;
	}
	public String getSMobile() {
		return SMobile;
	}
	public void setSMobile(String sMobile) {
		SMobile = sMobile;
	}
	public String getSAddress() {
		return SAddress;
	}
	public void setSAddress(String sAddress) {
		SAddress = sAddress;
	}
	public String getSZipCode() {
		return SZipCode;
	}
	public void setSZipCode(String sZipCode) {
		SZipCode = sZipCode;
	}
	public String getSEmail() {
		return SEmail;
	}
	public void setSEmail(String sEmail) {
		SEmail = sEmail;
	}
	public String getSType() {
		return SType;
	}
	public void setSType(String sType) {
		SType = sType;
	}
	public void setInsuranceApps(Set<InsuranceApplication> insuranceApps) {
		this.insuranceApps = insuranceApps;
	}
	public Set<InsuranceApplication> getInsuranceApps() {
		return insuranceApps;
	}
	
}
